package com.consumer._05_filter;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        topic = "boot-filter",
        consumerGroup = "spring-boot-consumer-demo",
/*        selectorType = SelectorType.SQL92,
        selectorExpression = "age>18"*/

        selectorType = SelectorType.TAG,
        selectorExpression = "TagA || TagC"
)
public class Consumer5 implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        System.out.println("消费的内容:" + message);
    }
}